<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class ProductMaterial extends Model
{
    protected $guarded = ['id'];

    public function product()
    {
    	return $this->belongsTo(Product::class);
    }

    public function getPicArrAttribute()
    {   
    	$arr = [];
    	if($this->pics) {
    		 $arr = explode(',', $this->pics);

    	}
    	return $arr;
    }

   
    
}
